package com.song.studylineserver.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName sl_title
 */
@TableName(value ="sl_title")
@Data
public class Title implements Serializable {
    /**
     * 文章序号
     */
    @TableId(type = IdType.AUTO)
    private Integer titleId;

    /**
     * 教学题目
     */
    private String titleName;

    /**
     * 学习类型
     */
    private String titleStudytype;

    /**
     * 简介

     */
    private String titleDesc;

    /**
     * 作者

     */
    private String titleAuthor;

    /**
     * 标签
     */
    private String titleTags;

    /**
     * 创建时间
     */
    private Date titleCreatetime;

    /**
     * 从属
     */
    private String titleBy;

    /**
     * 内容
     */
    private String titleContent;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Title other = (Title) that;
        return (this.getTitleId() == null ? other.getTitleId() == null : this.getTitleId().equals(other.getTitleId()))
            && (this.getTitleName() == null ? other.getTitleName() == null : this.getTitleName().equals(other.getTitleName()))
            && (this.getTitleStudytype() == null ? other.getTitleStudytype() == null : this.getTitleStudytype().equals(other.getTitleStudytype()))
            && (this.getTitleDesc() == null ? other.getTitleDesc() == null : this.getTitleDesc().equals(other.getTitleDesc()))
            && (this.getTitleAuthor() == null ? other.getTitleAuthor() == null : this.getTitleAuthor().equals(other.getTitleAuthor()))
            && (this.getTitleTags() == null ? other.getTitleTags() == null : this.getTitleTags().equals(other.getTitleTags()))
            && (this.getTitleCreatetime() == null ? other.getTitleCreatetime() == null : this.getTitleCreatetime().equals(other.getTitleCreatetime()))
            && (this.getTitleBy() == null ? other.getTitleBy() == null : this.getTitleBy().equals(other.getTitleBy()))
            && (this.getTitleContent() == null ? other.getTitleContent() == null : this.getTitleContent().equals(other.getTitleContent()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTitleId() == null) ? 0 : getTitleId().hashCode());
        result = prime * result + ((getTitleName() == null) ? 0 : getTitleName().hashCode());
        result = prime * result + ((getTitleStudytype() == null) ? 0 : getTitleStudytype().hashCode());
        result = prime * result + ((getTitleDesc() == null) ? 0 : getTitleDesc().hashCode());
        result = prime * result + ((getTitleAuthor() == null) ? 0 : getTitleAuthor().hashCode());
        result = prime * result + ((getTitleTags() == null) ? 0 : getTitleTags().hashCode());
        result = prime * result + ((getTitleCreatetime() == null) ? 0 : getTitleCreatetime().hashCode());
        result = prime * result + ((getTitleBy() == null) ? 0 : getTitleBy().hashCode());
        result = prime * result + ((getTitleContent() == null) ? 0 : getTitleContent().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", titleId=").append(titleId);
        sb.append(", titleName=").append(titleName);
        sb.append(", titleStudytype=").append(titleStudytype);
        sb.append(", titleDesc=").append(titleDesc);
        sb.append(", titleAuthor=").append(titleAuthor);
        sb.append(", titleTags=").append(titleTags);
        sb.append(", titleCreatetime=").append(titleCreatetime);
        sb.append(", titleBy=").append(titleBy);
        sb.append(", titleContent=").append(titleContent);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}